﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Amazon.DynamoDBv2.Model;
using AmazonDynamoDBStub.Models;

namespace AmazonDynamoDBStub.Repositories
{
    using DynamoDBItem = IGrouping<Guid, DynamoDBAttribute>;

    public interface IDynamoDBAttributeRepository : IRepository<DynamoDBAttribute>
    {
        DynamoDBItem CreateItem(string tableName, params KeyValuePair<string, AttributeValue>[] keyAttributes);
        DynamoDBItem GetItem(string tableName, Expression<Func<DynamoDBItem, bool>> predicate);
        IEnumerable<IGrouping<Guid, DynamoDBAttribute>> FindItems(string tableName, Expression<Func<DynamoDBItem, bool>> predicate);
        void RemoveItem(DynamoDBItem item);
        int GetItemCount(string tableName);
    }
}
